import Mixins from '@/views/mixins'
import product from '@/api/eims/productAPI'
export default {
  mixins: [Mixins],
  created () {
    this.initPageList()
  },
  methods: {
    getRequestType (opt) {
      if (this.id === 'product') {
        if (opt === 'delete') {
          return product.deleteProductAPI
        } else if (opt === 'update') {
          return product.updateProductAPI
        } else if (opt === 'add') {
          return product.addProductAPI
        }
        return product.getProductListAPI
      }
    }
  }
}
